‫Welcome to our second lecture, not let me mention that I am not a native English speaker, but this
‫is not going to be a barrier between me and you.
‫I have a determination to make you understand how to develop ERP next applications, and therefore I
‫am going to be steady as I speak.
‫I am going to go slow.
‫I am going to make sure that I am audible and I am hopeful that you are going to get their value that
‫you need in this course.
‫Therefore, as we said in our first lecture, this second lecture, we are going to be setting up an
‫environment which we are going to be using to develop APIs.
‫So by setting up environment, I do not mean installation.
‫I am hopeful that you have already installed your instance of ERP.
‫Next here you can see mine.
‫It is ready.
‫It is waiting for me to do the next steps.
‫So here what we are going to do.
‫I am going to show you how to create a custom up.
‫And there is one way I am going to be showing you how to create your custom app is because creating
‫your custom should always be the step that you take when you want to write API.
‫Is your custom APIs on top of ERP next?
‫And the reason is because when you write your code outside of ERP next, you have got to be safe.
‫Everything that the Firepit team and the European team next team.
‫Right, they are put in deploys a new a new version of ERP next.
‫You will not be worried because you are caught will not be conflicting with what they have written.
‫You code will be on your own custom app.
‫It will be calling functions inside of ERP next, but it will be outside.
‫But if you write, you are quote on top of ERP next files.
‫If they make changes to those files, then most likely when you do an upgrade or an update, your version
‫or your code is going to be overridden by what they have written.
‫Therefore, this is the reason why every time you want to write or you own custom staff on ERP next,
‫the first step should be to create a custom app.
‫I'm going to show you how to do that.
‫Then after that, what you are going to do here is that we are going to take that up of ours and we
‫are going to install it on top of our site that we already have on ERP next.
‫I am saying already have, because I am assuming that you are instances already running.
‫You have installed the site and because we do not need any other site, we are just going to install
‫the app that we will create on our site.
‫I am hopeful that I'm very clear that I will be showing you that as we move along on this one, then
‫the next thing we are going to do is that I'm going to show you practically how you're going to do,
‫how you can check whether you are successfully installed.
‫There are multiple checks that you can make in just make sure that your application will run smoothly.
‫And then after that, I am also going to introduce you very briefly to post posthuman, an application
‫that we are going to be using mostly during this series.
‫Therefore, without wasting so much all the effort, without spending so much more time on this explanation,
‫let me jump in and do a bench start so that I can start.
‫My, my, my, my, my.
‫So that I can start my instance, so I can see that my instance is running on 43000 and 40000 in three,
‫and therefore I can just come here and reload.
‫Is 40000 and three in waiting for it to reload, so go ahead also on you, on your machine and jump
‫start your instance and carry on.
‫Let me split my Tamino here so that we are able to work on side by side.
‫We have, for instance, running here and we can work on this area.
‫And the terminal I am using here, this is Caminada and there is on my left.
‫I mean, it is because I am able to split it into so many sections.
‫It is it is limitless.
‫I can split it into so many sections and do my thing comfortably within the same screen.
‫Let me increase 40 years for those who are able to see well and know what I'm going to do here just
‫knows that we are logged when we split this window.
‫The thing has blocked us out from the ERP next the and we are logged in NASCAR only.
‫So make sure to remember to do Sudoku and then go back to the next supply their PASWAN and we are logged
‫in Europe next.
‫And therefore I can now go to bench and sorry, it's not Europeanist.
‫We are working with the Karani instance and once I am there, how will we create a new app is just by
‫doing bench bench new app and then give it a name.
‫I'm going to call it ERP next at my study master ERP next month.
‫Then you can call this whatever you want to call it.
‫It's a depending on what you want to build with your app.
‫So I proceed.
‫This one by default gives you the name here depending on what you have supplied here.
‫So just if you want to change this title, you can just change it a bit here.
‫But I'm comfortable with ERP next month.
‫That is why I click next.
‫And the app description.
‫This one is just for API, for ERP next API series.
‫Serious, and then the publisher, the publisher is this one is whoever is publishing the Opsware can
‫see this one is me.
‫So Jeffrey Garani sorry, Jeffrey Karani is my name.
‫And then the image Re-supply the email.
‫Yes.
‫Well, again, I also play my email address.
‫Please don't spam that email address and then the icon.
‫Don't worry about that again, just to leave it for now.
‫The Akala, I don't mind about that.
‫And then they license sort this license here by default.
‫This a you can change it whatever you want.
‫I am comfortable with Mitt and then this thing is going to go ahead and start creating.
‫You are epper, you are up.
‫So nothing has been done.
‫It has been created and it is successful.
‫You can see that it is is done.
‫So the next thing that we are going to do here is to install this app on top of our site.
‫So how do you know they say that you are running now then it's not we are going to do now is to install
‫this app on top of our site.
‫So how are we going to do that?
‫We are going to run a command here, a hopeful thing that, you know, your site, you just the bench
‫side.
‫You have to get to the players here side to my side is called Karani.
‫And then you say instore up and then you give it the name of the app that you just created in my name
‫is ERP next month, so I can copy and paste it here.
‫And if this is going to be successful, you're going to see it in store that up in our instance.
‫So I click on Go See I cannot find our next mustardy.
‫So let's check in with our app.
‫OK, everything is in small, so we do install ERP next year, so it's ERP next I.
‫And it is installing our up in a just like that, our app has been installed successfully.
‫OK, so the next thing that you are going to do, just to be sure, make sure you check the file that
‫is running.
‫So let me clear this one so I will just run clear to clear the terminal and then I am going to slide
‫into the sites, the site's directory.
‫So I'm going to go into sites then went to list.
‫Yeah, I have yeah.
‫I have a site called Karani.
‫And then what I'm going to do here is.
‫And what I'm going to do here, I'm going to see the into the sights directly and when there is this,
‫you are going to see that I have a site here called Karani.
‫So if you want to know whether you are able to successfully check inside this this this file got.
‫Absolutely.
‫So I can just cut into absolute text and I will see here that surely I have an app called ERP next Monday
‫to see me do that again.
‫And he may have ERP next mustardy.
‫All right.
‫The next thing I am going to do now is to check this app inside of our inside of our our running application.
‫So you can see that once we installed the app, our bench stops running.
‫Let me respond here.
‫Also benchtop stops.
‫I stop running.
‫It wants us to restart it.
‫So we are going to do that right away.
‫So, Ben, start and now we are having our applications starting.
‫So when you check into your site, when I reload, let me check, first of all, before before I go
‫there, go to help and talk about and you will see here that ERP next mustardy has been installed successfully
‫on our application.
‫So let's go ahead and start our bench and start and we can see our bench starting there.
‫Make sure you do the same.
‫Make sure you check bench to make sure it is running.
‫And then when you come back to your application, when you check, click on hairpin click on about.
‫You should see your ERP need to master.
‫The application has been installed successfully.
‫Now this is going to be a your name.
‫So if you could you are you are you are your application ABC make sure to see ABC here.
‫The other thing that I need to mention here is when you are doing this, make sure that your application
‫is developer mode set to go through.
‫So make sure that you are developer mode is active in how you do not go to the application imagery from
‫the Tamino shrink.
‫That and from your site you can see into your site.
‫So I would guarantee you that directly.
‫You will see if I could say it configure Jason, so if you will, into that that that file you should
‫have this file, this line of code developer mode said to one, if it is here and then to zero, please
‫make sure it is set to one.
‫If it is not the entirety, just add to their file and you'll be fine.
‫So let me just exit here and the next thing that I would like you to introduce you to is posthuman.
‫If you do not have posthuman installed on your machine, install it now or you can use any other EPA
‫testing application that you like other people like insomnia and others.
‫It's up to you, up the up to you.
‫Others have applications.
‫Are they like these are these are plug in for versions to the code.
‫You can use whatever you want, but I will personally in this course be using Posman to test our APIs.
‫Having said that, let me let go let me head into our application in 80 here.
‫This is the application that is running and he will see that we have a new directory called ERP next
‫mustardy.
‫Again, I think we have to increase the font here for the sake of your eyes.
‫We have a directory ENFP next to my study.
‫And when you open this directory, we have another idea to record Europea next.
‫Mustardy, and this is what is our module.
‫So any time you install a new app, it creates a module with bearing the name of that up.
‫So the next master, instead of the name of our app, is the module that you are going to be running.
‫If you open that module, you'll find that we have a couple of folders here, like, for instance,
‫a public folder contains the Cyesis in the years that the application will be running on and any other
‫files that you may want to put here.
‫I'll be going into the details of this these files within the post.
‫And then here before we leave, I want to mention very briefly the Hawks NPA file, because it is very,
‫very important that I mentioned this to you.
‫Of course, it has the details of our up.
‫And then we have so many other things that are here.
‫We are going to be exploring this file as we move along.
‫There is a lot that we are going to be doing here because this is the file that we are going to be using
‫to be to call other things or to trigger things when other actions have taken place.
‫So here we have our episode of our Hooks NPA file in.
‫The next thing that I would like to do before we close this, this video is to create our API file,
‫right.
‫Because we are getting our environment ready, remember?
‫So on the direct order, the place where you have hoopsters spy, you can just go ahead and.
‫Right.
‫Click on this and create a new file.
‫I don't know what they'll be able to see.
‫If we can call it the APO episode of PI.
‫I like to call it that.
‫Of course, I'm being told I do not have permission to write there because this, this, this studio
‫is logged in, is opened by the.
‫The road user, you need to open it as long as you're up next user or because we are developers, what
‫we are going to do, we are going to go here, go back, go back and then slide into apps, simply go
‫back again, make sure you have this directory, this I wanted to make sure you're are seeing this subsidy
‫into apps and then go to our next mustardy app and then you can list again into your next mustardy when
‫you least here you see that this is where we have our Hogzilla API.
‫So we can just go ahead now and use this pseudo command to create sadhus pseudo Tajh and then I don't
‫pay.
‫All right.
‫And then I enter and now that file has been created for me.
‫So when I come back to this was to the code, I will find that here I have a file called Approved by.
‫So to make sure that we have permissions to write on this file, because right now, if I just do import
‫Frappier, this is the first thing we are going to be doing again and will be allowed to save it to
‫make sure that they do not have these problems in the future.
‫Let me just change the permissions of these files so I'll do sudo tunes their mode seven seven seven
‫four API to play file.
‫OK, so this this file now has been opened.
‫I can write it comfortably, I can see it in UK.
‫Do not get any error.
‫I'm going to stop here.
‫So this is where we are going to be starting to write our code now then.
‫So in the next section that is lesson number three.
‫What we are going to be doing is that we are going to be creating our first P, I think you so much
‫and see you in the next lecture.